import { createApp } from "vue";
import LoadingApp from "./src/Loading.vue";
import type { ILoadingOptions } from "./types";
export default {
  open: (options?: ILoadingOptions) => {
    const app = createApp(LoadingApp, { ...options });
    // const divEl = document.createElement("div");
    // divEl.setAttribute("id", "loading-container");
    // document.body.append(divEl);
    app.mount("#loading-container");
    return {
      close: () => {
        app.unmount();
      },
    };
  },
};
